<?php
/**
 * todu
 *
 * @copyright Copyright (c) 2018 Create-Chain PHP Group
 * @author    atangege
 */

namespace App\Model;


use Illuminate\Database\Eloquent\Model;

class OldOrder extends Model
{
    protected $table = 'service_trade.orders';

    const STATUS_WAITING_FOR_PAY = 1;//待付款
    const STATUS_WAITING_FOR_CONFIRM = 2;//待确认
    const STATUS_WAITING_FOR_DELIVERY = 3;//待发货
    const STATUS_WAITING_FOR_RECEIVE = 4;//待收货
    const STATUS_RECEIVED = 5;//已收货
    const STATUS_REJECT = 6;//拒收
    const STATUS_WAITING_FOR_COMMENT = 7;//待评价
    const STATUS_COMMENTED = 8;//已评价
    const STATUS_PAID_OR_WAITING_FOR_DELIVERY = 9;//已付款
    const STATUS_CANCEL = 10;//取消订单
    const STATUS_DELETED = 11;//删除订单
    const STATUS_ABNORMAL_ORDER = 12; // 异常退单
    const STATUS_ABNORMAL_ORDER_AND_CLOSE = 13; // 异常结单
    const STATUS_REFUND = 14; // 退款

    public static function multiple($status)
    {
        switch ($status) {
            case self::STATUS_WAITING_FOR_PAY:
                return '待付款';
            case self::STATUS_WAITING_FOR_CONFIRM:
                return '待确认';
            case self::STATUS_WAITING_FOR_DELIVERY:
                return '待发货';
            case self::STATUS_WAITING_FOR_RECEIVE:
                return '待收货';
            case self::STATUS_RECEIVED:
                return '已收货';
            case self::STATUS_REJECT:
                return '拒收';
            case self::STATUS_WAITING_FOR_COMMENT:
                return '待评价';
            case self::STATUS_COMMENTED:
                return '已评价';
            case self::STATUS_PAID_OR_WAITING_FOR_DELIVERY:
                return '已付款';
            case self::STATUS_CANCEL:
                return '取消订单';
            case self::STATUS_DELETED:
                return '删除订单';
            case self::STATUS_ABNORMAL_ORDER:
                return '异常退单';
            case self::STATUS_ABNORMAL_ORDER_AND_CLOSE:
                return '异常结单';
            case self::STATUS_REFUND:
                return '退款';

            default:
                return '未知状态';
        }
    }
}
